package org.sws.domain.strategy.service.armory.algorithm;

import org.sws.domain.strategy.model.entity.StrategyAwardEntity;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author sws
 * @Date 2025/4/23 09:01
 * @description:
 */
public interface IAlgorithm {

    /**
     * 活动策略算法装配
     * @param key 缓存key
     * @param strategyAwardEntities 奖品策略集合
     * @param rateRange 概率范围
     */
    void armoryAlgorithm(String key, List<StrategyAwardEntity> strategyAwardEntities, BigDecimal rateRange);

    /**
     * 奖品策略算法执行 - 获取对应奖品ID
     * @param key 缓存key
     * @return 缓存value中的奖品ID
     */
    Integer dispatchAlgorithm(String key);

}
